package com.niit.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Types;
//商品表
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Goods {
    private int id;//id

  private String cover;//封面

    private String name;//名称

    private String intro;//介绍

    private String spec;//规格

    private String content;//详情

    private int price;//价格

    private int stock;//库存

    private int sales;//销量

    private int t_id;//分类ID


    private Typing typing;

  //  private boolean top;



    public Goods( String name, String intro, String spec, String price, String stock, String content) {
//    this.cover=cover;
    this.name=name;
    this.intro=intro;
    this.spec=spec;
    this.price= Integer.parseInt(price);
    this.stock= Integer.parseInt(stock);
//    this.typing=typing;
    this.content=content;
    }

  public Goods(String name, String intro, String spec, String price, String stock, String content, int t_id) {
    this.name=name;
    this.intro=intro;
    this.spec=spec;
    this.price= Integer.parseInt(price);
    this.stock= Integer.parseInt(stock);
//    this.typing=typing;
    this.content=content;
    this.t_id=t_id;
  }

  public Goods(int id, String name, String intro, String spec, String price, String stock, String content, int tId) {
   this.id=id;
    this.name=name;
    this.intro=intro;
    this.spec=spec;
    this.price= Integer.parseInt(price);
    this.stock= Integer.parseInt(stock);
//    this.typing=typing;
    this.content=content;
    this.t_id=tId;
  }

    public Goods(int id, String name, String intro, String spec, String price, String stock, String content) {
        this.id=id;
        this.name=name;
        this.intro=intro;
        this.spec=spec;
        this.price= Integer.parseInt(price);
        this.stock= Integer.parseInt(stock);
//    this.typing=typing;
        this.content=content;
    }
}
